Skip to content

iOS 27 camera: the still image output takes 420f (N104 asks for a 10-bit still pool) - #371

Draft
claudiusthebot wants to merge 7 commits into
mainfrom
agent/scion-camera-app4/preview
Draft

claudiusthebot wants to merge 7 commits into
mainfrom
agent/scion-camera-app4/preview

Conversation

@claudiusthebot

Copy link
Copy Markdown
Collaborator

The camera's graph on iOS 27 could not start because the still image output had no pixel format.

N104's AVCaptureSession.plist marks the photo formats of both cameras (and 1080p, 720p, 1920 x 1440) UsesPacked10BitFirmwareStillImageOutputPixelFormat. With it, iOS 27.0.1's source node (-[BWMultiStreamCameraSourceNode _supportedPixelFormatsForOutputID:], 24A446's shared cache, logic only) keeps for the still image output only the stream's formats that are full range and 10-bit. The S9's streams offered 420f, 420v and BGRA, so none was left.

  • camera_refuse.c: -[FigCaptureSourceVideoFormat usesPacked10BitFirmwareStillImageOutputPixelFormat] answers NO, so the still image output takes 420f like every other output. cam_still10=1 keeps the plist's answer.
  • camera_formats.c: the StillImage output also offers xf20. camera_tenbit.c draws into such a pool: the picture is made in 8 bits into a scratch 420f buffer, then widened.
  • camera_device.c: deliver() takes xf20 under HAKIOS_CAMERA_N104 only. The 16.5 path is unchanged in behaviour (compiled without N104 to check). The arch-size allowance goes from 1989 to 2006 for this.
  • CAMERA.md: the fifth cause.

Built as cam-n104fmt-17.dylib (sha256 de5dc9d42595191dfef19f145d9a611c7bf3e317bc63a7effed9d13c85d623ba) on the build Mac. It is with the phone tester. Not run on a phone yet. This PR stays a draft until the phone test comes back.

The talon npm run preflight lane does not apply: this is scion-kernel, not a talon checkout. tools/arch-check.py passes locally.

🤖 Generated with Claude Code

… is drawn into xf20

N104's photo formats say UsesPacked10BitFirmwareStillImageOutputPixelFormat. With it, iOS 27.0.1's source node keeps for
its still image output only the stream's pixel formats that are 10-bit and full range
(-[BWMultiStreamCameraSourceNode _supportedPixelFormatsForOutputID:], 24A446's shared cache, its logic only); the S9's
streams offered 420f, 420v and BGRA, so the still image output had no pixel format.

camera_refuse.c answers NO to -[FigCaptureSourceVideoFormat usesPacked10BitFirmwareStillImageOutputPixelFormat] (the still
image output then takes 420f); cam_still10=1 keeps the plist's answer. camera_formats.c also offers 'xf20' on the
StillImage output, and camera_tenbit.c draws a picture into such a pool (made in 8 bits, widened). iOS 16.5's device is
unchanged in behaviour. Not run on a phone.
…t's configuration back as set

Phone 1 with dylib -17: iOS 27's graph sets VideoOutputConfigurations for IntermediateTap and Depth, which
camera_device.c did not keep; -[BWMultiStreamCameraSourceNode allocateOrReuseBufferPoolsFromSourceNode:] then reads the
property back, finds no pixel format for the output and throws ("output pixel format () doesn't match the
pixelBufferPool's pixel format (420f)"; 24A446, its logic only), and cameracaptured aborts at every session.

On iOS 27 (HAKIOS_CAMERA_N104) IntermediateTap is a fourth output, drawn as the scalers are; the configurations of outputs
not drawn are given back as they were set. camera_outputs.c says each output a configuration, enable or handler set names,
on one line. iOS 16.5's device is unchanged in behaviour. Not run on a phone.
… 420f, its pool's

Phone 1 with dylib -18: the graph configures PrimaryScaler (1504 x 1128) with no PixelFormat, its pool (shared with the
other streaming outputs) is 420f, and the source node's read-back of VideoOutputConfigurations throws on the mismatch.
camera_outputs.c gives such a configuration back with PixelFormat 420f. Not run on a phone.
… 420f too

Phone 1 with dylib -19: PrimaryScaler's configuration carries PixelFormat 0, not none, so -19's read-back left it alone
and the source node threw as before. Not run on a phone.
…s to

Phone 1 with dylib -20: the graph runs and the source node's preview output emits, but no later node emits and the screen
stays black; the stitcher and the image queue sink the flow trace wrapped were never called. camera_flownext.c says, at
each output's first sample, the node its connection leads to and traces that node's render and drop methods. Not run on
a phone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant